<fieldset>
    <legend>条件搜索</legend>
    <form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">设备名称</label>
            <label class="layui-input-inline">
                <select class="layui-select" lay-search="" name="d_id">
                    <option value=''>- 全部 -</option>
                    {foreach $devices as $k=>$v}
                    {if input('d_id') eq $k.''}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}{/foreach}
                </select>
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">箱格状态</label>
            <label class="layui-input-inline">
                <select class="layui-select" name="box_status">
                    <option value=''>- 全部 -</option>
                    {foreach $box_status as $k=>$v}
                    {if input('box_status') eq $k.''}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}{/foreach}
                </select>
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">箱格锁状态</label>
            <label class="layui-input-inline">
                <select class="layui-select" name="is_lock">
                    <option value=''>- 全部 -</option>
                    {foreach [1=>'已锁',0=>'未锁'] as $k=>$v}
                    {if input('is_lock') eq $k.''}
                    <option selected value="{$k}">{$v}</option>
                    {else}
                    <option value="{$k}">{$v}</option>
                    {/if}{/foreach}
                </select>
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">版号</label>
            <label class="layui-input-inline">
                <input name="device_board" value="{:input('get.device_board')}" placeholder="请输入版号" class="layui-input">
            </label>
        </div>

        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">箱门编号</label>
            <label class="layui-input-inline">
                <input name="box_num" value="{:input('get.box_num')}" placeholder="请输入箱门编号" class="layui-input">
            </label>
        </div>

        {if empty($user_stores)}
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">创建时间</label>
            <div class="layui-input-inline">
                <input data-date-range name="create_at" value="{:input('get.create_at')}" placeholder="请选择创建时间" class="layui-input">
            </div>
        </div>
        {/if}

        <div class="layui-form-item layui-inline">
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
        </div>
    </form>
</fieldset>

<script>form.render()</script>
